<template>
    <div>
        <ul class="mui-table-view">
			<li class="mui-table-view-cell mui-media" v-for="(item, index) in Newsl" :key="index">
				<router-link :to="'/home/NewInfo/'+item.id">
					<img class="mui-media-object mui-pull-left" :src="item.img_url">
					<div class="mui-media-body">
						<h3>{{item.title}}</h3>
						<p class="mui-ellipsis">
                            <span>发布日期: {{item.add_time | dataFormet}}</span>
                            <span>点击: 0次</span>
                        </p>
					</div>
				</router-link>
			</li>				
        </ul>
    </div>
</template>


<script>
export default {
    created(){
        this.NewLists()
    },
    data () {
        return {
            Newsl:[]
        }
    },
    methods:{
        NewLists(){
            this.$http.get('/api/getnewslist').then(result=> {
                 if(result.data.status===0){
                    this.Newsl=result.data.message;
                }             
            })
        }
    }
}
</script>
